package com.share.tool.mock.model.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author 01401061 - 孙艳强
 * @date 2020/12/16 14:01
 */
@Data
public class DbMockReq {
    @ApiModelProperty("一个批次循环次数")
    private Integer oneBatchCycleNum;

    @ApiModelProperty("批次次数")
    private Integer batchNum;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("入库的表名字")
    private String tableName;

    public Integer getBatchNum() {
        if (batchNum == null) {
            batchNum = 30000;
        }
        return batchNum;
    }
    public Integer getOneBatchCycleNum() {
        if (oneBatchCycleNum == null) {
            oneBatchCycleNum = 4000;
        }

        if(oneBatchCycleNum>4000){
            oneBatchCycleNum = 4000;
        }
        return oneBatchCycleNum;
    }

    public Date getCreateTime() {
        if (createTime == null) {
            createTime = new Date();
        }
        return createTime;
    }

}
